
#include"proc.h"
#include<string.h>
#include<unistd.h>

#define SIZE 101
#define STYLE '#'
void process()
{
  char bar[SIZE];
  memset(bar,'\0',sizeof(bar));
  int i= 0;
  while(i<=100)
  {
    printf("[%-100s] %d%%\r",bar,i);
    fflush(stdout);//刷新显示屏
    bar[i++]=STYLE;
    usleep(100000);//等待100000us = 1s
  }
  printf("\n");
}
